package com.sunwayworld.basemodule.business.outsource.resource.impl;

import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.sunwayworld.basemodule.business.outsource.resource.LimsOutsourceApplyResource;
import com.sunwayworld.basemodule.business.outsource.service.LimsOutsourceApplyService;
import com.sunwayworld.framework.spring.annotation.GikamBean;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogModule;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;

@LogModule("外包单")
@RestController
@GikamBean
public class LimsOutsourceApplyResourceImpl implements LimsOutsourceApplyResource {

    @Autowired
    private LimsOutsourceApplyService limsOutsourceApplyService;

    @Override
    public LimsOutsourceApplyService getService() {
        return limsOutsourceApplyService;
    }

    @Log(value = "新增外包单", type = LogType.INSERT)
    @Override
    @RequestMapping(method = RequestMethod.POST)
    public Long insert(RestJsonWrapperBean wrapper) {
        return getService().insert(wrapper);
    }

    @Override
    public JSONObject insertMulti(RestJsonWrapperBean wrapperBean) {
        return getService().insertMulti(wrapperBean);
    }

    @Override
    public JSONObject resultDone(RestJsonWrapperBean wrapperBean) {
        return getService().resultDone(wrapperBean);
    }

    @Override
    public JSONObject setCourier(RestJsonWrapperBean wrapperBean) {
        return getService().setCourier(wrapperBean);
    }

    @Override
    public JSONObject submitCheck(RestJsonWrapperBean wrapperBean) {
        return getService().submitCheck(wrapperBean);
    }
}
